//用双指针 慢指针放在0  让快指针走，当快指针不等于0的时候交换两个指针的值
var moveZeroes = function(nums) {
    let slow = 0
    let fast = 0
    while(fast<nums.length){
        if(nums[fast] !== 0){
            [nums[fast],nums[slow]] = [nums[slow],nums[fast]]
            slow++
        }
        fast++
    }   
    return nums
};